<h2 align="left">Editar Instrumento Cliente</h2><hr>

<?php include("pesquisarInstrumentoCliente.php");?>

<form action="alterarInstrumentoCliente.php" method="post">
  <table align="left">

    <tbody>

      <tr>

        <td>Numero de Serie </td>

        <td> <input name="nsSerie" type="text" value="<?=$nsSerie?>"></td>

      </tr>

      <tr>

        <td>ID Categoria </td>

        <td>
        <select name="idCategoria"><option></option><?php include("listarIdCategoria.php"); ?> </select>

        </td>

      </tr>

      <tr>

        <td>Nome </td>

        <td> <input name="nome" type="text" value="<?=$instrumentos[0]['nome']?>"></td>

      </tr>

      <tr>

        <td>Marca </td>

        <td> <input name="marca" type="text" value="<?=$instrumentos[0]['marca']?>"></td>

      </tr>

      <tr>

        <td>Modelo </td>

        <td> <input name="modelo" type="text" value="<?=$instrumentos[0]['modelo']?>"></td>

      </tr>

      <tr>

        <td>ID Cliente </td>

        <td> <input name="idCliente" type="text" value="<?=$instrumentos[0]['id_cliente']?>"></td>

      </tr>

      <tr>

        <td align="left"> <input name="alterar" value="Alterar" type="submit"></td>
		

      </tr>

    </tbody>
  </table>

</form>


	<script>
		for(i = 0; i < document.forms[0].idCategoria.options.length; i++){
			if(document.forms[0].idCategoria.options[i].value == <?=$instrumentos[0]['id_categoria']?>){
				document.forms[0].idCategoria.options[i].selected = true;
				break;
			}
		}
	</script>  
	
	
	
	
	

</body>
</html>
